#include "forward_session_udp.h"
#include "common.h"

#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>

forward_session_udp::forward_session_udp(forward_pair& fwd_pair) : forward_session(fwd_pair){
	reset();
}

forward_session_udp::~forward_session_udp(){

}

int forward_session_udp::packet_forward(FORWARD_DIRECTION direction){

}

int forward_session_udp::pend_forward(FORWARD_DIRECTION direction){

}

void forward_session_udp::close(){
	if (fd_out >= 0){
		::close(fd_out);
	}
	forward_session::close();
}

void forward_session_udp::reset(){
	fd_out = -1;
	forward_session::reset();
}

const char* forward_session_udp::to_string(){
	static char tmp [128] = {0};
	sprintf(tmp, "<session-%d %d,%d>", (int)(this), (int)-1, (int)fd_out);
	return tmp;
}



